#ifndef __MYSPI_H
#define __MYSPI_H

#include "n32g45x.h"


#define SPIz          SPI3
#define SPIz_CLK      RCC_APB1_PERIPH_SPI3
#define SPIz_GPIO     GPIOB
#define SPIz_GPIO_CLK RCC_APB2_PERIPH_GPIOB
#define SPIz_PIN_NSS  GPIO_PIN_2
#define SPIz_PIN_SCK  GPIO_PIN_3
#define SPIz_PIN_MISO GPIO_PIN_4
#define SPIz_PIN_MOSI GPIO_PIN_5


//#define SPIz          SPI2
//#define SPIz_CLK      RCC_APB1_PERIPH_SPI2
//#define SPIz_GPIO     GPIOB
//#define SPIz_GPIO_CLK RCC_APB2_PERIPH_GPIOB
//#define SPIz_PIN_NSS  GPIO_PIN_12
//#define SPIz_PIN_SCK  GPIO_PIN_13
//#define SPIz_PIN_MISO GPIO_PIN_14
//#define SPIz_PIN_MOSI GPIO_PIN_15




uint8_t MY_SPIz_ReadWriteByte(uint8_t TxData);
void MYSPI_Init(void);


#endif

